<?php
/**
 * Created by littleU.
 * User: littleU
 * Date: 2021-02-03
 * Time: 15:21
 */

namespace app\api\controller\v1\cms;


use app\api\controller\BaseController;
use app\common\tool\qiniu\Upload as UploadService;

class Upload extends BaseController
{
    public function uploadToQiniuDefault()
    {
        $service = new UploadService();
        $result = $service->uploadToDefault();
        return $result;
    }

    public function uploadToQiniuDir()
    {
        $fileName = input('post.file_name');
        $fileDir = input('post.file_dir');
        $service = new UploadService();
        $result = $service->uploadToBucket($fileName, $fileDir);
    }
}